import { defineStore } from 'pinia';

export const useStore = defineStore('userData', {
    state: () => ({
        userData: {
            "13342725221": {
                name: "老婆饼", // % 昵称
                psw: 12345678, // % 密码
                imgUrl: "https://foruda.gitee.com/avatar/1663922592882570137/11664315_matcha-emerald_1663922592.png", // % 头像
                Favorites: [], // % 收藏
                Shopping_Cart: [], // % 购物车
                balance: 0, // % 余额
                address: [
                    {
                        addressDetail: "12312312312",
                        areaCode: "440513",
                        city: "汕头市",
                        country: "",
                        county: "潮阳区",
                        isDefault: true,
                        name: "陈耿楠",
                        postalCode: "",
                        province: "广东省",
                        tel: "13342725221",
                    },
                ], // % 地址
                order: [], // % 订单
                historylist:[111,],
                coupon: [
                    {
                        value: 50,
                        limit: 150,
                        title: "新人满减券",
                        type: "reduce",
                        term: "2022-12-30",
                    },
                    {
                        value: 100,
                        limit: 600,
                        title: "新人满减券",
                        type: "reduce",
                        term: "2022-12-30",
                    },
                    {
                        value: 5.5,
                        limit: 1000,
                        title: "新人5.5折券",
                        type: "discount",
                        term: "2022-12-30",
                    },
                    {
                        value: 6.6,
                        limit: 800,
                        title: "新人6.6折券",
                        type: "discount",
                        term: "2022-12-30",
                    },
                ], // % 优惠券
            },
        },

    }),
    persist: true,
    getters: {

    },

    actions: {

    }
})